package com.hp.service;

import java.util.List;

import cn.hutool.core.convert.Convert;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hp.mapper.MasterAddressMapper;
import com.hp.bean.MasterAddress;
import com.hp.service.IMasterAddressService;


/**
 * 技师地址Service业务层处理
 * 
 * @author wyl
 * @date 2021-08-10
 */
@Service
public class MasterAddressServiceImpl implements IMasterAddressService 
{
    @Autowired
    private MasterAddressMapper masterAddressMapper;

    /**
     * 查询技师地址
     * 
     * @param id 技师地址主键
     * @return 技师地址
     */
    @Override
    public MasterAddress selectMasterAddressById(Integer id)
    {
        return masterAddressMapper.selectMasterAddressById(id);
    }

    /**
     * 查询技师地址列表
     * 
     * @param masterAddress 技师地址
     * @return 技师地址
     */
    @Override
    public List<MasterAddress> selectMasterAddressList(MasterAddress masterAddress)
    {
        return masterAddressMapper.selectMasterAddressList(masterAddress);
    }

    /**
     * 新增技师地址
     * 
     * @param masterAddress 技师地址
     * @return 结果
     */
    @Override
    public int insertMasterAddress(MasterAddress masterAddress)
    {
        return masterAddressMapper.insertMasterAddress(masterAddress);
    }

    /**
     * 修改技师地址
     * 
     * @param masterAddress 技师地址
     * @return 结果
     */
    @Override
    public int updateMasterAddress(MasterAddress masterAddress)
    {
        return masterAddressMapper.updateMasterAddress(masterAddress);
    }

    /**
     * 批量删除技师地址
     * 
     * @param ids 需要删除的技师地址主键
     * @return 结果
     */
    @Override
    public int deleteMasterAddressByIds(String ids)
    {
        return masterAddressMapper.deleteMasterAddressByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除技师地址信息
     * 
     * @param id 技师地址主键
     * @return 结果
     */
    @Override
    public int deleteMasterAddressById(Integer id)
    {
        return masterAddressMapper.deleteMasterAddressById(id);
    }
}
